<%--
  Created by IntelliJ IDEA.
  User: dengdc
  Date: 2017/7/19
  Time: 17:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html>
<head>
    <title>diyishou </title>
    <jsp:include page="../../head.jsp"/>
    <script type="text/javascript">
//        <!--业务编码、集装箱号、合同协议号、提运单号、进出口类型、收发货人、供应商、下单人-->
        var formSetting = {
            title: "查询信息",
            module: 'query',
            columns: [
                {
                    name: "groupName",
                    label: "组名"
                },{
                    name: "id",
                    label: "主键"
                }],
            buttons: {
                custom: [{
                    id: "updatebtn3",
                    value: "业务维护",
                    click: function () {
                        var id = $("#bookingsDataGrid").jqGrid("getGridParam",
                                                               "selrow");
                        if (id) {
                            window.location.href =
                                    "business-checkDetail?id=" + id
                                    + "&singleType=F&identification=list";
                        } else {
                            jw.alert("请点击需要操作的数据!");
                        }
                    }
                },{
                    id: "updatebtn0",
                    value: "新增组",
                    click: function () {
                        var id = $("#bookingsDataGrid").jqGrid("getGridParam",
                                                               "selrow");
                        if (id) {
                            window.location.href =
                                    "business-checkDetail?id=" + id
                                    + "&singleType=F&identification=list";
                        } else {
                            jw.alert("请点击需要操作的数据!");
                        }
                    }
                },
                {
                    id: "updatebtn1",
                    value: "修改组",
                    click: function () {
                        var id = $("#bookingsDataGrid").jqGrid("getGridParam",
                                                               "selrow");
                        if (id) {
                            window.location.href =
                                    "business-checkDetail?id=" + id
                                    + "&singleType=F&identification=list";
                        } else {
                            jw.alert("请点击需要操作的数据!");
                        }
                    }
                },
                {
                    id: "updatebtn2",
                    value: "删除组",
                    click: function () {
                        var id = $("#bookingsDataGrid").jqGrid("getGridParam",
                                                               "selrow");
                        if (id) {
                            window.location.href =
                                    "business-checkDetail?id=" + id
                                    + "&singleType=F&identification=list";
                        } else {
                            jw.alert("请点击需要操作的数据!");
                        }
                    }
                }]
            },
            grid: {
                id: "originalDeclarationGrid",
                title: "查询结果",
                url: "/tgendeclainsgroup/list",
                colModel: [{
                    index: "id",
                    name: "id",
                    width : 30,
                    formatter:function(val, colModel, rowObj){
                        return rowObj.ID;
                    },key: true
                },
    			{ label: '组名', name: 'groupName', index: 'GROUP_NAME', width: 60 },
    			{ label: '创建者', name: 'creator', index: 'CREATOR', width: 60 },
                { label: '创建时间', name: 'createTime', index: 'CREATE_TIME', width: 60 }		
    			], 			
    			multiselect: true
            }
        };
        $(document).ready(function () {
            $("#table").mrdForm(formSetting);
        });
    </script>
</head>
<body>
<div id="table"></div>
</body>
</html>
